using System;
using System.Collections;

namespace Eshouse.Entity
{
	

	/// <summary>
	/// Menu object for NHibernate mapped table 'menu'.
	/// </summary>
	public class Menu
	{
		#region Member Variables
		
		protected int _id;
		protected int _modelID;
		protected int _menuID;
		protected int _fatherID;
		protected string _menuName;
		protected string _menuUrl;
		protected int _orderID;
		protected string _note;

		#endregion

		#region Constructors

		public Menu() { }

		public Menu( int modelID, int menuID, int fatherID, string menuName, string menuUrl, int orderID, string note )
		{
			this._modelID = modelID;
			this._menuID = menuID;
			this._fatherID = fatherID;
			this._menuName = menuName;
			this._menuUrl = menuUrl;
			this._orderID = orderID;
			this._note = note;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public virtual  int ModelID
		{
			get { return _modelID; }
			set { _modelID = value; }
		}

		public virtual  int MenuID
		{
			get { return _menuID; }
			set { _menuID = value; }
		}

		public virtual  int FatherID
		{
			get { return _fatherID; }
			set { _fatherID = value; }
		}

		public virtual  string MenuName
		{
			get { return _menuName; }
			set
			{
				if ( value != null && value.Length > 64)
					throw new ArgumentOutOfRangeException(" Invalid value for MenuName", value, value.ToString());
				_menuName = value;
			}
		}

		public virtual  string MenuUrl
		{
			get { return _menuUrl; }
			set
			{
				if ( value != null && value.Length > 128)
					throw new ArgumentOutOfRangeException(" Invalid value for MenuUrl", value, value.ToString());
				_menuUrl = value;
			}
		}

		public virtual  int OrderID
		{
			get { return _orderID; }
			set { _orderID = value; }
		}

		public virtual  string Note
		{
			get { return _note; }
			set
			{
				if ( value != null && value.Length > 128)
					throw new ArgumentOutOfRangeException(" Invalid value for Note", value, value.ToString());
				_note = value;
			}
		}

		

		#endregion
	}
	
}